package com.example.spinning.mapper;

import com.example.spinning.bean.WareHousePack;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WareHousePackMapper {

    //得到打包
    List<WareHousePack> getWareHousePack(@Param("start") Integer start, @Param("count") Integer count);

    //查找表的行数
    int getCountWareHousePack();

    //根据条件查找表的行数
    int getCountWareHousePackByCondition(
            @Param("workshop") String workshop,
            @Param("customer") String customer,
            @Param("date") String date,
            @Param("batch_no") String batch_no,
            @Param("name") String name
            );

    //根据id查找打包
    WareHousePack getWareHousePackById(Long id);

    //根据条件查询打包
    List<WareHousePack> getWareHousePackByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("workshop") String workshop,
            @Param("customer") String customer,
            @Param("date") String date,
            @Param("batch_no") String batch_no,
            @Param("name") String name
    );

    //增加
    int addWareHousePack(WareHousePack wareHousePack);

    //修改
    int updateWareHousePackById(WareHousePack wareHousePack);

    //删除
    int delWareHousePackById(@Param("ids") String[] ids);


}
